<%@ page import="java.util.List" %>
<%@ page import="com.yyyzzz.bean.Course" %>
<%@ page import="com.yyyzzz.service.impl.teacherServiceImpl" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: ZY
  Date: 2021/12/11
  Time: 0:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>教师课程信息</title>
</head>
<body>
<h3>查看教师课程信息</h3>
<div>
    <table>
        <tr>
            <th>课程号</th>
            <th>课程名称</th>
            <th>教师姓名</th>
            <th>上课教师</th>
            <th>学分</th>
        </tr>
        <%
            String name = String.valueOf (request.getAttribute ("name"));
            System.out.println (name);
            teacherServiceImpl teacherService = new teacherServiceImpl ();
            List<Course> list = teacherService.selectCourseTeacher (name);
            for (Course course : list
            ) {
        %>
        <tr>
            <td><%=course.getCourseId ()%>
            </td>
            <td><%=course.getCourseName ()%>
            </td>
            <td><%=course.getCourseTeacher ()%>
            </td>
            <td><%=course.getClassroom ()%>
            </td>
            <td><%=course.getCredit ()%>
            </td>
        </tr>
        <%
            }%>
    </table>
</div>
</body>
</html>
